package com.example.smartcitydemo.network.api

import com.example.smartcitydemo.bean.*
import retrofit2.http.*

/**
 * @PACKAGE_NAME: com.example.smartcitydemo.network.api
 * @NAME: Caleb.F
 * @DATE: 2021/11/3 8:26
 * @Email: 1919796283@qq.com
 * 需要加token的接口
 */
interface AuthApiService {
    /**
     * 新闻点赞
     * @param aritcleId Int
     * @return SuccessBean
     */
    @PUT("/prod-api/press/press/like/{id}")
    suspend fun doLikeArticle(@Path("id") aritcleId: Int): SuccessBean

    /**
     * 评论点赞
     */
    @PUT("/prod-api/press/pressComment/like/{id}")
    suspend fun doLikeCommit(@Path("id") commitReplyId: Int): SuccessBean


    /**
     * 新增评论
     */
    @POST("/prod-api/press/pressComment")
    suspend fun commitReply(@Body newsCommit: NewsCommitBean): SuccessBean

    @GET("/prod-api/api/common/user/getInfo")
    suspend fun getPersonInfo(): UseInfo

    /**
     * 修改个人信息
     * @param modifyPersonInfo ModifyPersonInfo
     * @return SuccessBean
     *
     */
    @PUT("/prod-api/api/common/user")
    suspend fun modifyPersonInfo(@Body modifyPersonInfo: ModifyPersonInfo): SuccessBean

    /**
     */
    @GET("prod-api/api/bus/order/list")
    suspend fun getBusOrder(@Query("status") status: Int): BaseListResponse<BusOrderInfo>

    /**
     * 修改密码
     */
    @PUT("/prod-api/api/common/user/resetPwd")
    suspend fun modifyPassword(@Body modifyPassword: ModifyPassword): SuccessBean

    /**
     * 意见反馈
     */
    @POST("/prod-api/api/common/feedback")
    suspend fun doReplyMessage(@Body replyMessage: ReplyMessage): SuccessBean

    @GET("/prod-api/api/common/feedback/list")
    suspend fun getReplyList():BaseListResponse<ReplyBean>





    /**
     * 查询职位列表
     */
    @GET("/prod-api/api/job/profession/list")
    suspend fun getJobType(): BaseListResponse<JobTypeBean>

    /**
     * 职位模糊查询
     */
    @GET("prod-api/api/job/profession/list")
    suspend fun getJobTypeByName(@Query("professionName") name: String): BaseListResponse<JobTypeBean>


    /**
     * 投递简历
     * @param deliverBean DeliverPostBean
     * @return ResultResponse
     */
    @POST("prod-api/api/job/deliver")
    suspend fun postDeliver(@Body deliverBean: DeliverPostBean): SuccessBean

    /**
     * 查询投递历史
     * @return BaseListResponse<DeliverHistoryBean>
     */
    @GET("/prod-api/api/job/deliver/list")
    suspend fun getDeliverList(): BaseListResponse<DeliverHistoryBean>


    /**
     * 按照pos获取招聘详情
     */
    @GET("/prod-api/api/job/post/{id}")
    suspend fun getPostDetail(@Path("id") id: Int): BaseResponse<JobListBean>

    /**
     * 获取简历详情
     * @param id Int
     * @return BaseResponse<ResumeDetailBean>
     */
    @GET("/prod-api/api/job/resume/{id}")
    suspend fun getResumeatail(@Path("id") id: Int): BaseResponse<ResumeDetailBean>





    /**
     * 新增个人简历
     * @param resumePostBean ResumePostBean
     * @return ResultResponse
     */
    @POST("/prod-api/api/job/resume")
    suspend fun postPersonResume(@Body resumePostBean: ResumePostBean): SuccessBean

    /**
     * 修改个人简历信息
     * @param resumeModifyBean ResumeModifyBean
     * @return ResultResponse
     */
    @PUT("/prod-api/api/job/resume")
    suspend fun postModifyResume(@Body resumeModifyBean:ResumeModifyBean): SuccessBean

    /**
     * 查询个人简历列表
     */
    @GET("/prod-api/api/job/resume/list")
    suspend fun getResumeList():BaseListResponse<ResumeDetailBean>

    /**
     * 新增巴士订单
     * @param bean SmartBusRequestBean
     * @return BusOrderResponseBean
     */
    @POST("/prod-api/api/bus/order")
    suspend fun postBusOrder(@Body bean: SmartBusRequestBean): BusOrderResponseBean
}